<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <mate name="viewport" content="width=device-width, initial-scale=1.0"></mate>
    <title>标签</title>
    <script src="../static/js/jquery.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.js"></script>
    <link href="https://cdn.jsdelivr.net/npm/semantic-ui@2.5.0/dist/semantic.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../static/css/me.css">

</head>
<body>
    <!--导航-->
    <nav th:replace="_fragments :: menu(3)" class="ui inverted attached segment m-padded-tb-tiny m-shadow-small">
        <div class="ui container">
            <div class="ui inverted stackable menu secondary ">
                <h2 class="ui teal header  item">广软社区</h2>
                <a href="index.html" class="m-item item m-mobile-hide"><i class="small home icon"></i>首页</a>
                <a href="type.html" class="m-item item m-mobile-hide"><i class="small idea icon"></i>分类</a>
                <a href="#" class=" m-item item m-mobile-hide"><i class="small tags icon"></i>标签</a>
                <a href="archives.html" class="m-item item m-mobile-hide"><i class="small clone icon"></i>归档</a>
                <a href="infoMe.html" class="m-item item m-mobile-hide"><i class="small info icon"></i>关于我</a>
                <div class="right item">
                    <div class="m-item ui inverted transparent m-mobile-hide icon input">
                        <input type="text" placeholder="Search...">
                        <i class="search link icon"></i>
                    </div>
                </div>
            </div>
        </div>
        <a href="#" class="ui menu toggle black basic inverted m-top-right button m-mobile-show">
            <i class="sidebar icon" style="width: 0.1em"></i>
        </a>
    </nav>

    <!--中间内容-->
    <div class=" m-container-small m-padded-tb-big">
        <div class="ui stackable container">
            <div class="ui  attached segment">
                <!--标签头部标题-->
                <div class="ui two column grid">
                    <div class="column">
                        <h2 class="ui teal header">标签</h2>
                    </div>
                    <div class="right aligned column">
                        共 <h2 class="ui orange header m-inline-block" th:text="${page.totalElements}">14</h2> 篇
                    </div>
                </div>
            </div>
            <!--标签内容-->
            <div class="ui attached segment m-padded-tb-large">
                <a href="#" th:each="tag:${tags}"  th:href="@{/tags/{id}(id=${tag.id})}" th:classappend="${tag.id==tagId} ? 'teal'"
                   class="ui basic left pointing label m-margin-tb-tiny">
                    <span th:text="${tag.name}">方法论</span> <div class="detail" th:text="${tag.countTag}" >23</div>
                </a>
            </div>

            <!--展示列表-->
            <div class="ui teal top attached segment">
                <!--一个文章展示-->
                <div class="ui padded vertical segment" th:each="blog : ${blogs}">
                    <div class="ui middle aligned mobile reversed stackable grid">
                        <div class="eleven wide column">
                            <h3 class="ui header">
                                <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank" th:text="${blog.title}" class="m-black">
                                    你真的理解什么是财富自由吗？
                                </a>
                            </h3>
                            <p class="m-text">
                                <a href="#" class="m-black" th:text="|${blog.description}......|" th:href="@{/blog/{id}(id=${blog.id})}">
                                    正确做好任何一件事情的前提时清晰、正确的理解目标。而事实是，我们很多人很多时候根本没有对目标正确的定义，甚至根本从来就没有想过，只是大家都那么做而已......
                                </a>
                            </p>
                            <div class="ui grid">
                                <div class="eleven wide column">
                                    <div class="ui horizontal mini link list">
                                        <div class="item">
                                            <img th:src="@{${blog.user.realAvatar}}" src="https://picsum.photos/seed/picsum/100/100" alt="" class="ui avatar image">
                                            <div class="content">
                                                <a href="#" th:text="${blog.user.nickname}" class="header">陈炯燏</a>
                                            </div>
                                        </div>
                                        <div class="item">
                                            <i class="calendar icon"></i> <span th:text="${#dates.format(blog.createTime,'yyyy-MM-dd')}">2023-7-23</span>
                                        </div>
                                        <div class="item">
                                            <i class="eye icon"></i> <span th:text="${blog.views}">123</span>
                                        </div>
                                    </div>
                                </div>
                                <div class="right aligned mini five wide column">
                                    <a href="#" target="_blank" th:text="${blog.type.name}" class="ui teal basic label m-padded-tiny m-text-thin">认知升级</a>
                                </div>
                            </div>
                        </div>
                        <div class="five wide column">
                            <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" target="_blank">
                                <img th:src="${blog.firstPicture}" src="https://picsum.photos/seed/picsum/800/450" alt=""
                                     class="ui rounded image">
                            </a>
                        </div>
                    </div>
                </div>
            </div>

            <!--博客内容底部-->
            <div class="ui attached segment" th:if="${page.totalPages}>1">
                <div class="ui middle aligned two column grid">
                    <div class="column">
                        <a href="#" th:href="@{/tags(page = ${page.number}-1)}" th:unless="${page.first}" class="ui teal mini basic button">上一页</a>
                    </div>
                    <div class="right aligned column">
                        <a href="#" th:href="@{/tags(page = ${page.number}+1)}" th:unless="${page.last}" class="ui teal mini basic button">下一页</a>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <!--底部footer-->
    <footer th:replace="_fragments :: footer" class="ui inverted vertical segment m-padded-tb-max">
        <div class="ui center aligned container">
            <div class="ui inverted divided stackable grid">
                <div class="three wide column">
                    <div class="ui inverted list">
                        <div class="item">
                            <img src="../../static/images/scanner_picture.jpg" class="ui rounded image" alt="站长二维码" style="width: 120px;">
                        </div>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">最新博客</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item" > 用户故事（User Story）</a>
                        <a href="#" class="item" > 用户故事（User Story）</a>
                        <a href="#" class="item" > 用户故事（User Story）</a>
                    </div>
                </div>
                <div class="three wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced">联系我</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item" > Email:1718707267@qq.com</a>
                        <a href="#" class="item" > QQ:1718707267</a>
                    </div>
                </div>
                <div class="seven wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced ">ChenJionyu</h4>
                    <p class="m-text-thin m-text-spaced m-text-lined m-opacity-mini">这是我的个人博客，会分享关于编程、写作、思考、相关徳任何内容，希望可以给来到这儿的人有所帮助...</p>
                </div>
            </div>
            <div class="ui inverted section divider"></div>
            <p class="m-text-thin m-text-spaced m-opacity-mini">Copyright ©2023 DaiYan Designed by ChenJiongyu </p>
        </div>
    </footer>

    <script>
        $(".menu.toggle").click(function (){
            $(".m-item").toggleClass("m-mobile-hide");
        })
    </script>
</body>
</html>